<?php


namespace App\Middleware;


use App\Base\AuthManager;
use App\Base\ErrCode;
use App\Base\Response;

class CheckToken
{
    use Response;
    public function handle()
    {
        if (!AuthManager::auth()) {
            self::returnJson(ErrCode::$tokenErr, [], 'Token错误');
        }
    }
}